import { stringify } from 'qs';
import request from '../utils/request';
import { solo } from '../common/solo';

export async function queryProjectNotice() {
  return request('/api/project/notice');
}

export async function queryActivities() {
  return request('/api/activities');
}

export async function queryRule(params) {
  return request(`/api/rule?${stringify(params)}`);
}

export async function removeRule(params) {
  return request('/api/rule', {
    method: 'POST',
    body: {
      ...params,
      method: 'delete',
    },
  });
}

export async function addRule(params) {
  return request('/api/rule', {
    method: 'POST',
    body: {
      ...params,
      method: 'post',
    },
  });
}

export async function fakeSubmitForm(params) {
  return request('/api/forms', {
    method: 'POST',
    body: params,
  });
}

export async function fakeChartData() {
  return request('/api/fake_chart_data');
}

export async function queryTags() {
  return request('/api/tags');
}

export async function queryBasicProfile() {
  return request('/api/profile/basic');
}

export async function queryAdvancedProfile() {
  return request('/api/profile/advanced');
}

export async function queryFakeList(params) {
  return request(`/api/fake_list?${stringify(params)}`);
}

export async function fakeAccountLogin(params) {
  return request('/api/login/account', {
    method: 'POST',
    body: params,
  });
}

export async function fakeRegister(params) {
  return request('/api/register', {
    method: 'POST',
    body: params,
  });
}



//首页
export async function queryRuleHome() {
  return request(`${solo.baseUrl}task/index`);
}
//调用消息通知接口
export async function queryNotices() {
  // return request(`${solo.baseUrl}product/getProductDisplay`);
  return request(`${solo.baseUrl}message/homeMessage`);
  // return request('/api/notices');
}


//查看消息
export async function getNoticesById(params) {
  return request(`${solo.baseUrl}message/getById/${params.id}`);
}

//登录
export async function loginToLoki(params) {
  return request(`${solo.baseUrl}/user/login`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//退出登录
export async function logout() {
  return request(`${solo.baseUrl}user/logout`);
}

//修改密码
export async function updatePassWord(params) {
  return request(
    `${solo.baseUrl}/user/updatePassWord`,
    {
      method: 'POST',
      directlyPost: true,
      body: params,
    });
}

//重置用户管理里面的用户密码
export async function changePassword(params) {
  return request(`${solo.baseUrl}user/resetPw/${params.userId}`);
}

//验证码
export async function fetchCode(params) {
  return request(`${solo.baseUrl}user/verificationCode`);
}

//渠道列表
export async function getChannelList(params) {
  return request(`${solo.baseUrl}channel/list`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}
//新增渠道
export async function createChannel(params) {
  return request(`${solo.baseUrl}channel/create`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}
//修改渠道基本信息
export async function updateChannel(params) {
  // console.log('修改渠道基本信息,updateChannel', params);
  return request(`${solo.baseUrl}channel/update`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}
//修改渠道状态
export async function updateChannelState(params) {
  return request(`${solo.baseUrl}channel/openChannel`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}
//渠道审核
export async function auditChannel(params) {
  return request(`${solo.baseUrl}channel/channelVerify`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//获取渠道详情
export async function detailsChannel(params) {
  return request(`${solo.baseUrl}channel/detail/${params.channelId}`);
}

//产品管理列表
export async function getProductList(params) {
  return request(`${solo.baseUrl}product/list`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}
//获取产品详情
export async function queryProductDetails(params) {
  return request(`${solo.baseUrl}product/detail/${params.id}`);
}

//获取产品展业
export async function getProductDisplay() {
  return request(`${solo.baseUrl}product/getProductDisplay`);
}


//业务补导入（山东）
export async function fetchlImportList(params) {
  return request(`${solo.baseUrl}icbcsd/diviapply/list`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//业务补导入（山东）详情
export async function fetchBusinessDetails(params) {
  return request(`${solo.baseUrl}icbcsd/diviapply/show/${params.id}`);
}

//业务补导入（山东）查询状态
export async function queryBusinessStatus(params) {
  return request(`${solo.baseUrl}icbcsd/diviapply/query/${params.id}`);
}

//业务补导入（山东）上报及补录接口所以参数
export async function submitBrack(params) {
  return request(`${solo.baseUrl}icbcsd/diviapply/apply/`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//业务补导入（山东）保存
export async function submitDetails(params) {
  return request(`${solo.baseUrl}icbcsd/diviapply/update/`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//业务补导入（山东）重传影像
export async function submitUploadVideo(params) {
  return request(`${solo.baseUrl}icbcsd/diviapply/applyAttachs/${params.id}`);
}

//业务补导入（山东）重新上报
export async function againSubmitBrank(params) {
  return request(`${solo.baseUrl}icbcsd/diviapply/reset/${params.id}`);
}

//添加产品
export async function addProduct(params) {
  return request(`${solo.baseUrl}product/create`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}
//修改产品状态
export async function updateProductState(params) {
  return request(`${solo.baseUrl}product/onCloseProduct`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}
//产品开通
export async function openProduct(params) {
  return request(`${solo.baseUrl}product/openProduct`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}
//产品修改
export async function updateProductDetails(params) {
  return request(`${solo.baseUrl}product/update`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}
//审核产品
export async function verifyProduct(params) {
  return request(`${solo.baseUrl}product/verifyProduct`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}
//编辑或新增产品展业
export async function createProductAcquisition(params) {
  return request(`${solo.baseUrl}product/updateDisplay`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//渠道修改
export async function channelProductdetailsUpdata(params) {
  return request(`${solo.baseUrl}channel/update`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//获取产品列表及分期列表
export async function getProductDiviList(params) {
  return request(`${solo.baseUrl}product/getProductDiviList/${params.branchId}`);
}

//根据ID删除消息
export async function deleteMessageById(params) {
  return request(`${solo.baseUrl}message/deleteMessageById/${params.id}`);
}

//删除渠道附件---- 渠道
export async function deleteChannelFile(params) {
  return request(`${solo.baseUrl}channel/deleteFile/${params.fileId}`);
}

//获取消息列表
export async function findByCustomerId(params) {
  return request(`${solo.baseUrl}message/findByCustomerId`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//批量删除消息
export async function deleteMessageByIds(params) {
  return request(`${solo.baseUrl}message/deleteMessageByIds`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//获取分配规则制定表
export async function getRuleTable() {
  return request(`${solo.baseUrl}node/getRuleTable`);
}

//指派人员列表
export async function getPersonnes(params) {
  return request(`${solo.baseUrl}node/getPersonnes/${params.nodeId}`);
}

//指派人员提交
export async function assignPersonne(params) {
  return request(`${solo.baseUrl}node/assignPersonne`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//转签选择分派人
export async function selectAssignor(params) {
  return request(`${solo.baseUrl}node/selectAssignor/${params.taskId}`);
}

//任务分派选择分派人
export async function selectAllot(params) {
  return request(`${solo.baseUrl}node/selectAllot/${params.taskId}`);
}

//获取客户余额
export async function getCustomerBalance() {
  return request(`${solo.baseUrl}applyVerify/getBalance`);
}

//获取客户此次查询扣款
export async function getCustomerPrice(params) {
  return request(`${solo.baseUrl}applyVerify/getUnivalent/${params.projectCode}`);
}

//获取支行列表
export async function getBankList() {
  return request(`${solo.baseUrl}apply/getBankList`);
}

//业务上报时选择银行客户经理
export async function selectCustManager() {
  return request(`${solo.baseUrl}apply/selectCustManager`);
}

//加密秘钥
export async function getSecretKey(params) {
  return request(`${solo.baseUrl}applyVerify/getSecretKey/${params.projectId}`);
}

//业务上报
export async function businnesSubmitToBank(params) {
  return request(`${solo.baseUrl}apply/doSubmit`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//发起征信
export async function startCredit(params) {
  return request(`${solo.baseUrl}applyVerify/startCredit`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//获取征信结果
export async function getCreditResult(params) {
  return request(`${solo.baseUrl}apply/getCreditResult`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//获取上报列表
export async function getReportList(params) {
  return request(`${solo.baseUrl}apply/getReportList`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//分派提交
export async function systemCommitAssign(params) {
  return request(`${solo.baseUrl}node/commitAssign`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//获取规则树
export async function getRoluesTree(params) {
  return request(`${solo.baseUrl}nodeAssignRole/getTree`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//机器规则-生成树
export async function getNodeAssignRole(params) {
  return request(`${solo.baseUrl}nodeAssignRole/genTree`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}


//制定机器规则-保存规则树
export async function saveTree(params) {
  return request(`${solo.baseUrl}nodeAssignRole/saveTree`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//修改分配规则
export async function nodeAssignUpdate(params) {
  return request(`${solo.baseUrl}nodeAssign/update`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//获取客户列表
export async function getCustomerList(params) {
  return request(`${solo.baseUrl}customer/list`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//业务中获取客户列表
export async function getApplyCustomerList(params) {
  return request(`${solo.baseUrl}customer/getApplyCustomerList`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//客户新增
export async function createCustomer(params) {
  return request(`${solo.baseUrl}customer/create`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}
//删除客户
export async function deleteCustomer(params) {
  return request(`${solo.baseUrl}customer/deleteCustomer/${params.id}`);
}

//删除客户关系人
export async function deleteCustomerRelation(params) {
  return request(`${solo.baseUrl}customer/deleteCustomerRelation`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//客户关系人新增
export async function createCustomerRelation(params) {
  return request(`${solo.baseUrl}customer/addCustomerRelation`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}
//获取客户关系人列表
export async function getCustomerRelation(params) {
  return request(`${solo.baseUrl}customer/getCustomerRelation/${params.customerId}`);
}

//反欺诈查询
export async function opposeCheat(params) {
  // console.log("params", params)
  return request(`${solo.baseUrl}applyVerify/opposeCheat`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//个人身份认证
export async function identityAuthentic(params) {
  // console.log("params", params)
  return request(`${solo.baseUrl}applyVerify/identityAuthentic`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//获取获取销售跟踪列表
export async function getTrackList(params) {
  return request(`${solo.baseUrl}customer/getCustomerTrackList/${params.id}`);
}

//新增销售跟踪
export async function addCustomerTrack(params) {
  // console.log("params", params)
  return request(`${solo.baseUrl}customer/addCustomerTrack`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

export async function createCustomerTrack(params) {
  return request(`${solo.baseUrl}customer/addCustomerTrack`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//修改客户详情
export async function updateCustomerDetails(params) {
  return request(`${solo.baseUrl}customer/update`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//获取产品详情
export async function getCustomerDetails(params) {
  return request(`${solo.baseUrl}customer/detail/${params.id}`);
}

//获取产品开通列表
export async function getF2CProductList(params) {
  return request(`${solo.baseUrl}product/getF2CProductList`);
}

//获取开通产品详情
export async function getF2CProductDetail(params) {
  return request(`${solo.baseUrl}product/getF2CProductDetail/${params.productId}`);
}
//判断身份证是否存在
export async function existIdcard(params) {
  return request(`${solo.baseUrl}customer/existIdcard/${params.idcard}`);
}

//业务列表
export async function fetchApply(params) {
  return request(`${solo.baseUrl}apply/list`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//业务详情
export async function detailsApply(params) {
  return request(`${solo.baseUrl}apply/show/${params.projectId}`);
}

//获取业务申请详情
export async function getCreateApplyDetails(params) {
  // console.log("params", params)
  return request(`${solo.baseUrl}apply/getCreate/${params.projectId}`);
}

//获取车品牌
export async function getCarBrandList() {
  return request(`${solo.baseUrl}car/carBrand`);
  // return request(`${solo.carTypeSelectUrl}car/carBrand`);
}

//删除附件---业务和风险相关
export async function deleteFile(params) {
  // console.log("params", params)
  return request(`${solo.baseUrl}attach/deleteAttach?url=${params.fileId}`);
}

//业务申请
export async function createApply(params) {
  // console.log("createApply2222", params)
  return request(`${solo.baseUrl}apply/create`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//查看业务流程进度
export async function approvalProgress(params) {
  return request(`${solo.baseUrl}flowApproval/approvalProgress/${params.projectId}`);
}

//业务上报中获取审核详情(银行审批)
export async function getBankApprovalList(params) {
  return request(`${solo.baseUrl}flowApproval/getBankApprovalList/${params.projectId}`);
}

//业务中删除关系人
export async function deleteRelation(params) {
  return request(`${solo.baseUrl}apply/deleteRelation/${params.relationId}`);
}

//预付费列表
export async function getPrePayList(params) {
  return request(`${solo.baseUrl}prepay/list`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//预付费列表导出
export async function prepayExport(params) {
  return request(`${solo.baseUrl}prepay/prepayExport`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//业务申请
export async function updateStartApply(params) {
  // console.log("updateStartApply", params)
  return request(`${solo.baseUrl}apply/updateFaqi`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//签约服务提交
export async function commitSignContract(params) {
  return request(`${solo.baseUrl}apply/commitSignContract`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//车系
export async function getCarSystemList(params) {
  return request(`${solo.baseUrl}car/carSystem`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//车型
export async function getCarModelList(params) {
  return request(`${solo.baseUrl}car/carModel`, {
    // return request(`${solo.carTypeSelectUrl}car/carModel`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//在业务中获取经销商列表
export async function getProList(params) {
  return request(`${solo.baseUrl}channel/getProList`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//业务详情提交
export async function businessAllCommit(params) {
  return request(`${solo.baseUrl}apply/showCommit`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//业务详情--业务信息保存 -
export async function saveBusiness(params) {
  return request(`${solo.baseUrl}apply/saveBusiness`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//业务详情--资产详情保存
export async function saveAssets(params) {
  return request(`${solo.baseUrl}apply/saveAssets`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//业务补导入
export async function submitData(params) {
  return request(`${solo.baseUrl}apply/submitData/${params.projectId}`);
}
//业务详情--还款能力保存
export async function saveAbility(params) {
  return request(`${solo.baseUrl}apply/saveAbility`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//业务受理 开始执行
export async function businessPerform(params) {
  // return request(`${solo.baseUrl}apply/execute/${params.projectId}`);
  return request(`${solo.baseUrl}apply/execute`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//获取业务受理详情（获取初筛结果）
export async function fetchApplyOperateDetail(params) {
  return request(`${solo.baseUrl}apply/getScreening/${params.projectId}`);
}

//业务申请时选择产品
export async function getApplyProductList() {
  return request(`${solo.baseUrl}product/getApplyProductList`);
}

//获取签约服务信息
export async function getSignContract(params) {
  return request(`${solo.baseUrl}apply/getSignContract/${params.projectId}`);
}

//获取放款管理信息
export async function getReleaseAmt(params) {
  return request(`${solo.baseUrl}apply/getReleaseAmt/${params.projectId}`);
}

//获取提车信息
export async function getPickCar(params) {
  return request(`${solo.baseUrl}apply/getPickCar/${params.projectId}`);
}

//提交提车信息
export async function commitPickCar(params) {
  return request(`${solo.baseUrl}apply/commitPickCar`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//业务详情--客户详情保存
export async function saveCustomerInfo(params) {
  return request(`${solo.baseUrl}apply/saveCustomerInfo`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//提交放款
export async function commitReleaseAmt(params) {
  return request(`${solo.baseUrl}apply/commitReleaseAmt`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//风险管理  获取业务详情（审核）
export async function getBusinessDetails(params) {
  return request(`${solo.baseUrl}apply/showVerify/${params.projectId}`);
}

//提车审核提交
export async function pickCarVerify(params) {
  return request(`${solo.baseUrl}apply/pickCarVerify`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//风险管理  家访信息获取
export async function showHomeVisit(params) {
  return request(`${solo.baseUrl}apply/showHomeVisit/${params.projectId}`);
}

//风险管理  业务初筛信息
export async function showScreen(params) {
  return request(`${solo.baseUrl}apply/showScreen/${params.projectId}`);
}

//风险管理  获取审核记录
export async function getApprovalList(params) {
  return request(`${solo.baseUrl}flowApproval/getApprovalList/${params.projectId}`);
}


//家访调查提交
export async function commitHomeVisit(params) {
  return request(`${solo.baseUrl}apply/commitHomeVisit`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//收入核实提交
export async function commitinComeVerify(params) {
  return request(`${solo.baseUrl}applyVerify/commitinComeVerify`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//客户核实提交
export async function commitCustomerVerify(params) {
  return request(`${solo.baseUrl}applyVerify/commitCustomerVerify`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//资产核实提交
export async function commitAssetsVerify(params) {
  return request(`${solo.baseUrl}applyVerify/commitAssetsVerify`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//资信核实提交
export async function commitinCreditVerify(params) {
  return request(`${solo.baseUrl}applyVerify/commitinCreditVerify`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//初筛提交-
export async function commitScreen(params) {
  return request(`${solo.baseUrl}apply/commitScreen`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//初筛提交- 单独
export async function commitScreen2(params) {
  return request(`${solo.baseUrl}apply/commitScreen2`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}


//任务管理-跳过当前任务
export async function jumpTaskList(params) {
  return request(`${solo.baseUrl}task/jump`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//任务管理-退回当前任务
export async function goBackTaskList(params) {
  return request(`${solo.baseUrl}task/goback`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//任务管理-跳过当前任务
export async function stopTaskList(params) {
  return request(`${solo.baseUrl}task/stop`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//任务管理-转派任务
export async function transferTaskList(params) {
  // console.log("params", params)
  return request(`${solo.baseUrl}task/transfer`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}


//审核(初审、复审)提交
export async function commitDoApproval(params) {
  return request(`${solo.baseUrl}apply/doApproval`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//组织架构
export async function getBranchTreeList() {
  return request(`${solo.baseUrl}branch/getBranchTreeList`);
}

//上级组织架构
export async function getParentBranchTreeList() {
  return request(`${solo.baseUrl}branch/getParentBranchTreeList`);
}

//
export async function getTaskList(params) {
  return request(`${solo.baseUrl}apply/getTaskList`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//任务列表
export async function queryTaskManageList(params) {
  return request(`${solo.baseUrl}apply/queryTaskManageList`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//新增组织
export async function createBranch(params) {
  return request(`${solo.baseUrl}branch/create`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//修改组织
export async function updateBranch(params) {
  // console.log("createBranch payload params", params)
  return request(`${solo.baseUrl}branch/update`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//删除组织
export async function deleteStructure(params) {
  return request(`${solo.baseUrl}branch/delete/${params.branchId}`);
}
//获取组织架构详情
export async function detailsStructure(params) {
  return request(`${solo.baseUrl}branch/detail/${params.id}`);
}
//员工管理列表
export async function queryUsersList(params) {
  return request(`${solo.baseUrl}user/list`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//获取角色列表
export async function getRoleList() {
  return request(`${solo.baseUrl}role/list`);
}

//新增员工获取角色列表
export async function getRoleListByCreateUser() {
  return request(`${solo.baseUrl}role/getRoleListByCreateUser`);
}

//配置角色的权限
export async function updateResource(params) {
  return request(
    `${solo.baseUrl}role/updateResource`,
    {
      method: 'POST',
      directlyPost: true,
      body: params,
    });
}
//添加角色
export async function createRole(params) {
  return request(`${solo.baseUrl}role/create`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//修改角色信息
export async function updateRole(params) {
  return request(`${solo.baseUrl}role/update`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}

//获取所有菜单和资源及角色资源
export async function getAllMenusByRoleId(params) {
  return request(`${solo.baseUrl}menus/getAllMenusByRoleId/${params.roleId}`);
}

//判断用户名是否重复
export async function existUserName(params) {
  return request(`${solo.baseUrl}user/existUserName/${params.userName}`);
}
//修改用户详情
export async function updataUsers(params) {
  return request(`${solo.baseUrl}user/update`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}
//获取用户详情
export async function userDetailsShow(params) {
  return request(`${solo.baseUrl}user/show/${params.id}`);
}
//添加用户
export async function addUsers(params) {
  return request(`${solo.baseUrl}user/create`, {
    method: 'POST',
    directlyPost: true,
    body: params,
  });
}
